# 数据库工具类
class SqlUtil(object):
    @staticmethod
    def dictfetchall(cursor):
        """
        数据库原生语法返回dict
        :param cursor:
        :return:
        """
        columns = [col[0] for col in cursor.description]
        return [
            dict(zip(columns, row))
            for row in cursor.fetchall()
        ]
